!function(e,i,t){"use strict";var c=window.dataLayer||[],n=function(i){var t;if("string"==typeof i)t=i;else{if(!e(i).length)return"";t=e(i).text()}return t.replace(/\n/g,"").trim()};t.behaviors.npLocalRecipe={attach:function(t){i("np-local-recipe-full-gtm-once",".node--type-recipe.node--view-mode-full",t).forEach((function(i){const t=e(i),a=n(e("h1.recipe__title",i));t.find(".recipe__actions__share .social-media-list a").each((function(i,n){e(n).on("click",(function(i){c.push({event:"share",event_name:"share",social_network:e(n).data("social-network"),content_id:t.data("content-id"),content_name:a,content_type:"Local Recipe",recipe_id:t.data("recipe-id")||"",recipe_name:a,item_id:"",item_name:""})}))}))}));i("np-local-recipe-teaser-gtm-once",".recipe.teaser",t).forEach((function(i){const t=e(i),a=n(e(".recipe__title",i));t.on("click",(function(e){c.push({event:"recipe_event",event_name:"recipe_event",recipe_id:t.data("recipe-id")||"",recipe_name:a,recipe_course:t.data("recipe-course")||"",recipe_total_time:t.data("recipe-total-time")||"",recipe_brand:t.data("recipe-brand")||"",recipe_chef:t.data("recipe-chef")||"",recipe_servings:t.data("recipe-servings")||"",recipe_difficulty:t.data("recipe-difficulty")||""})}))}))}}}(jQuery,once,Drupal);